package com.aster.service.manage.dto.do2dto;

import com.aster.service.manage.domain.TbLabelInfo;
import com.aster.service.manage.dto.DtoLabelInfo;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@org.mapstruct.Mapper
public interface LabelInfoConvert {
    LabelInfoConvert MAPPER = Mappers.getMapper(LabelInfoConvert.class);

    public DtoLabelInfo do2dto(TbLabelInfo tbLabelInfo);

    public List<DtoLabelInfo> dos2dtos(List<TbLabelInfo> list);

    public TbLabelInfo dto2do(DtoLabelInfo dtoLabelInfo);

    @Mapping(target="enterpriseId",ignore=true)
    @Mapping(target="labelText",ignore=true)
    @Mapping(target="state",ignore=true)
    public TbLabelInfo updateDeleted(DtoLabelInfo dtoLabelInfo);

    @Mapping(target="enterpriseId",ignore=true)
    @Mapping(target="labelText",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbLabelInfo updateState(DtoLabelInfo dtoLabelInfo);

    @Mapping(target="state",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbLabelInfo addData(DtoLabelInfo dtoLabelInfo);
}
